commonlibsse_ng\re\a\Actor/runtime_data.rs
1use windows::Win32::System::Threading::CRITICAL_SECTION;
2
3use crate::re::AIProcess::AIProcess;
4use crate::re::BSPointerHandle::{ActorHandle, ObjectRefHandle};
5use crate::re::BSTArray::BSTSmallArray;
6use crate::re::BSTSmartPointer::BSTSmartPointer;
7use crate::re::MagicItem::MagicItem;
8use crate::re::NiPoint3::NiPoint3;
9use crate::re::SpellItem::SpellItem;
10use crate::re::TESForm::TESForm;
11use crate::re::{
12 AITimeStamp, ActorMagicCaster, ActorMover, BGSDialogueBranch, BGSLocation, BipedAnim,
13 CombatController, EmotionType, MovementControllerNPC, TESFaction, TESPackage, TESRace,
14};
15
16use super::{
17 ACTOR_CRITICAL_STAGE_CEnum, ActorValueStorage, BOOL_BITS, BOOL_FLAGS, Modifiers,
18 SlotTypes_CEnum,
19};
20
21const _: () = assert!(SlotTypes_CEnum::count() == 4);
22
23#[derive(Debug, Clone, PartialEq)]
24pub struct ACTOR_RUNTIME_DATA {
25 pub boolBits: BOOL_BITS, // 0x0E0
26 pub updateTargetTimer: f32, // 0x0E4
27 pub criticalStage: ACTOR_CRITICAL_STAGE_CEnum, // 0x0E8
28 pub pad0EC: u32, // 0x0EC
29 pub currentProcess: *mut AIProcess, // 0x0F0
30 pub dialogueItemTarget: ObjectRefHandle, // 0x0F8
31 pub currentCombatTarget: ActorHandle, // 0x0FC
32 pub myKiller: ActorHandle, // 0x100
33 pub checkMyDeadBodyTimer: f32, // 0x104
34 pub voiceTimer: f32, // 0x108
35 pub underWaterTimer: f32, // 0x10C
36 pub thiefCrimeStamp: i32, // 0x110
37 pub actionValue: i32, // 0x114
38 pub timerOnAction: f32, // 0x118
39 pub unk11C: u32, // 0x11C
40 pub editorLocCoord: NiPoint3, // 0x120
41 pub editorLocRot: f32, // 0x12C
42 pub editorLocForm: *mut TESForm, // 0x130
43 pub editorLocation: *mut BGSLocation, // 0x138
44 pub actorMover: *mut ActorMover, // 0x140
45 pub movementController: BSTSmartPointer<MovementControllerNPC>, // 0x148
46 pub unk150: *mut TESPackage, // 0x150
47 pub combatController: *mut CombatController, // 0x158
48 pub vendorFaction: *mut TESFaction, // 0x160
49 pub calculateVendorFactionTimer: AITimeStamp, // 0x168
50 pub emotionType: EmotionType, // 0x16C
51 pub emotionValue: u32, // 0x170
52 pub unk174: u32, // 0x174
53 pub unk178: u32, // 0x178
54 pub intimidateBribeDayStamp: u32, // 0x17C
55 pub unk180: u64, // 0x180
56 pub addedSpells: BSTSmallArray<*mut SpellItem>, // 0x188
57 pub magicCasters: [*mut ActorMagicCaster; 4], // 0x1A0
58 pub selectedSpells: [*mut MagicItem; 4], // 0x1C0
59 pub selectedPower: *mut TESForm, // 0x1E0
60 pub unk1E8: u32, // 0x1E8
61 pub pad1EC: u32, // 0x1EC
62 pub race: *mut TESRace, // 0x1F0
63 pub equippedWeight: f32, // 0x1F8
64 pub boolFlags: BOOL_FLAGS, // 0x1FC
65 pub avStorage: ActorValueStorage, // 0x200
66 pub exclusiveBranch: *mut BGSDialogueBranch, // 0x220
67 pub healthModifiers: Modifiers, // 0x228
68 pub magickaModifiers: Modifiers, // 0x234
69 pub staminaModifiers: Modifiers, // 0x240
70 pub voicePointsModifiers: Modifiers, // 0x24C
71 pub lastUpdate: f32, // 0x258
72 pub lastSeenTime: u32, // 0x25C
73 pub biped: BSTSmartPointer<BipedAnim>, // 0x260
74 pub armorRating: f32, // 0x268
75 pub armorBaseFactorSum: f32, // 0x26C
76 pub soundCallBackSet: i8, // 0x271
77 pub unk271: u8, // 0x270
78 pub unk272: u8, // 0x272
79 pub unk273: u8, // 0x273
80 pub unk274: u32, // 0x274
81 pub unk278: u64, // 0x278
82 pub unk280: u64, // 0x280
83 pub unk288: CRITICAL_SECTION, // 0x288 havok related
84}
85const _: () = {
86 const ACTUAL_SIZE: usize = core::mem::size_of::<ACTOR_RUNTIME_DATA>();
87 const EXPECTED_SIZE: usize = (0x288 + 40) - 0x0E0;
88 // assert!(ACTUAL_SIZE == EXPECTED_SIZE);
89};